@import "tooltip";
@import "sweetalert2-overrides";
@import "form-overrides";

// Transformations
@mixin rotate($degrees) {
  -webkit-transform: rotate($degrees);
  -moz-transform: rotate($degrees);
  -ms-transform: rotate($degrees);
  -o-transform: rotate($degrees);
  transform: rotate($degrees);
}

// Drop shadows
@mixin box-shadow($shadow...) {
  -webkit-box-shadow: $shadow;
  -moz-box-shadow: $shadow;
  box-shadow: $shadow;
}

// Selected text
@mixin selection {
    ::-moz-selection { @content; }
    ::selection { @content; }
}

@include selection {
  color: #000000;
  background: $anthias-yellow-3;
}

$footer-height: 250px;
$secondary-color: #6c757d;
$base-line-height: 50px !default;

html {
  position: relative;
  min-height: 100%;
}

body {
  background-color: $anthias-purple-1;
  margin-top: 95px;
  margin-bottom: $footer-height + $base-line-height;
  font-family: "Plus Jakarta Sans", Helvetica, Arial, sans-serif;
}

@include tooltip;
@include swal2-overrides;

.form-control:focus {
  border-color: $anthias-purple-5;
}

.content {
  background-color: white;
  border-left: 6px solid $anthias-yellow-3;
  border-radius: 4px;
  padding: 15px 0;
  margin: 0;
}

.active-content {
  background-color: $anthias-purple-2;
  color: #FFFFFF;

  table {
    color: #FFFFFF;

    tbody > tr {
      background-color: $anthias-purple-2;
      color: rgba(255, 255, 255, 0.8);
    }
  }

  .btn {
    color: #FFFFFF;
    border-color: #FFFFFF;

    &:hover {
      background-color: #FFFFFF;
      color: $anthias-purple-1;
    }
  }
}

.inactive-content {
  border-left: 6px solid $anthias-yellow-3;
}


@media (max-width: 1199px) {
  .container {
    max-width: 100%;
  }
}

.modal-dialog {
  max-width: 580px;
  margin-top: 70px;
}

label {
  text-align: right;
}

.btn {
  padding: 12px 24px 12px 24px;

  &:focus {
    box-shadow: none !important;
  }
}

.btn-long {
  min-width: 13.125rem;
  @extend .rounded-pill;
}

.btn-primary {
  background-color: $primary;
  color: $dark;
  font-weight: 600;
}

.btn-outline-primary {
  color: #000000;
  background-color: #FFFFFF;
  border-color: #FFFFFF;
  transition: none;

  &:hover {
    background-image: $anthias-yellow-gradient;
  }
}

#app {
  .ActiveAssets, .InactiveAssets {
    thead {
      tr {
        th {
          text-align: center;
        }
      }
    }

  }

  .ActiveAssets {
    thead {
      tr {
        th {
          background-color: $anthias-purple-2;
          color: #FFFFFF;
          border-bottom: 0.15rem solid #FFFFFF;
        }
      }
    }

    tbody {
      tr {
        td {
          background-color: $anthias-purple-2;
          color: #FFFFFF;
        }
      }
    }
  }

  .InactiveAssets {
    thead {
      tr {
        th {
          border-bottom-width: 0.15rem;
          color: $secondary-color;
        }
      }
    }
  }

  .EmptyAssetMessage, #footer {
    a {
      text-decoration: none;

      &:hover {
        text-decoration: underline;
      }
    }
  }
}

.splash {
  background-color: $anthias-purple-1;
  background-size: 100% 100%;
  margin-top: 0;
  font-size: calc((1.5vw + 1.5vh) / 2);

  .splash-body {
    background-color: $anthias-purple-3;
    color: white;
  }

  // Temporary fix splash page for uzbl.
  .row {
    display: block;
  }

  .logo-container {
    padding: 3vh 0;
    margin-bottom: 3vh;

    img {
      width: 75%;
    }
  }

  @media (max-width: 767px) {
    .logo-container {
      padding: 20px 0px 20px 0px;

      img {
        max-height: 100px;
        width: auto;
      }
    }
  }

  .wireload-link {
    span {
      font-size: 16px;
    }

    a {
      img {
        width: 150px;
      }
    }
  }
}

.navbar {
  padding: 5px 0px;
  &.navbar-header {
    height: 85px;
  }

  .container {
    ul.nav li {
      a {
        padding: 10px 15px 10px;
        color: #fff;
        opacity: 0.5;

        &.active, &:hover {
          opacity: 1;
          text-decoration: none;
        }
      }
      &:last-child {
        a {
          padding-right: 0;
        }
      }
    }

    a {
      &.brand {
        text-shadow: 0 1px 0 #000;
        padding: 4px 0px;

        img {
          height: 38px;
        }

        span {
          font-size: 15px;
        }
      }
    }

    li.update-available {
      a {
        font-weight: bold;
      }
    }
  }
}

#footer {
  bottom: 0;
  height: $footer-height;
  position: absolute;
  width: 100%;

  .logo {
    img {
      max-height: 50px;
    }
  }

  .links {
    a {
      color: rgba(255, 255, 255, 0.70);
      font-weight: bold;
      text-transform: uppercase;

      &:hover {
        text-decoration: none;
        color: rgba(255, 255, 255, 0.90);
      }
    }
  }

  .copy {
    border-top: 1px solid rgba(0, 0, 0, .1);
    color: rgba(255, 255, 255, 0.70);
    font-size: 0.7em;
  }
}

h1.page-header {
  padding-bottom: 9px;
  margin: 20px 0 30px;
  border-bottom: 1px solid #eee;
  font-weight: bold;
}

section {
  .header {
    color: #fff;
    padding: 6px 9px;
    margin-bottom: 9px;
    border-top-right-radius: 4px;
    border-top-left-radius: 4px;
    font-weight: bold;
    text-shadow: #555 0px 1px 1px !important;
    text-transform: uppercase;
  }
}

.modal form {
  margin-bottom: 0;
}

.asset-location .nav {
  margin-bottom: 20px;
}

a.nav-link:not(.active) {
  color: #A0A0A0;
}

#add-asset-nav-tabs {
  border: 0px;

  .nav-link {
    border: 0px;
  }

  .active {
    border-bottom: 3px solid $anthias-yellow-3;
    font-weight: 600;
  }
}

.popover {

  .popover-header {
    font-weight: bold;
  }

  .popover-delete-content {
    width: 200px;
    padding-bottom: 4em;
  }

}

#request-error {
  z-index: 10000;

  .alert {
    margin-left: 300px;
    width: 500px;
  }
}

#add-form {
  .uri-text {
    padding-top: 5px;
    margin-left: 0px;
    overflow: hidden;
  }
}

.modal-footer {
  .status {
    float: left;
    margin-top: 6px;
  }

  .progress {
    margin-top: 4px;
    margin-bottom: 0px;
    width: 69%;
  }
}

#backup-section {
  .progress {
    margin-top: 5px;
    width: 50%;
    margin-bottom: 5px;
    display: inline-block;
  }
}

#assets {
  table td {
    line-height: 32px;
  }
}

input[name="file_upload"] {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  top: 0;
  left: 0;
}

.bootstrap-timepicker table td input {
  border: 1px solid #ced4da;
  border-radius: .25rem;
  width: 39px !important;
}

.duration {
  .controls {
    display: flex;
    align-items: center;
  }

  input {
    float: left;
    width: 24%;
    margin-right: 5px;
  }
}

.invalid-feedback {
  width: auto;
}

.form-actions {
  padding: 20px 20px;
  margin-top: 20px;
  margin-bottom: 20px;
  background-color: $anthias-purple-4;

  a, span {
    color: #1F002A;
  }
}

@mixin ellip() {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.filedrop {
  position: relative;
  border: 3px dashed #ccc;
  padding: 50px;
  text-align: center;
  color: #888;
  border-radius: 7px;
}

#file_upload_label {
  position: absolute;
  top: 5px;
  left: 105px;
  right: 0;
  @include ellip();
}

.accordion-inner {
  padding: 9px 0 0 0;
}

.accordion-group {
  border: none;
}

@mixin rota($angle,$time) {
  @each $prefix in webkit moz ms o {
    -#{$prefix}-transition: all $time linear;
    -#{$prefix}-transform: rotate($angle);
  }
  transition: all $time linear;
  transform: rotate($angle);
}

.unrotated {
  @include rota(0deg, .15s);
}

.rotated {
  @include rota(90deg, .15s);
}

.nocache-toggle {
  padding-top: 0 !important;
}

.advanced-accordion {
  display: none;
}

.modal-body {
  max-height: 600px !important;
}

.ui-sortable-helper {
  background: #fff;
}

.asset-icon {
  margin-left: 5px;
}

#inactive-assets i.fa-grip-vertical {
  display: none;
}

.asset_row_name {
  @include ellip();
  max-width: 290px;
  min-width: 290px;
  img {
    cursor: move;
  }
}

.asset_row_btns {
  padding: 12px 8px 10px 8px !important;
  white-space: nowrap;

  button {
    padding: 7px 10px;
  }
}

.table {
  td {
    vertical-align: middle !important;
  }

  .processing-message {
    width: 117px;
    margin-bottom: 2px;
  }
}

.terminal {
  background-color: #000 !important;
  border: none;
  color: #00ff00;
  padding: 8px;
  font-family: courier new, Helvetica, Arial, sans-serif;
  font-weight: bold;

  &:hover, &:active, &:focus {
    background-color: #000 !important;
    border: none;
    color: #00ff00;
    padding: 8px;
    font-family: courier new, Helvetica, Arial, sans-serif;
    font-weight: bold;
    box-shadow: none !important;
    outline: 0 !important;
    -webkit-appearance: none;
  }
}
